package com.lbz.service;

import com.lbz.common.ServerResponse;
import com.lbz.entity.User;
import org.apache.catalina.Server;

/**
 * @Author 林必昭
 * @Date 2019/6/16 16:35
 */
public interface UserService {

    //注册
    ServerResponse<String> register(User user);

    //登陆
    ServerResponse<User> login(String username,String password);

    //登陆注册验证
    ServerResponse<String> checkValid(String str,String type);

    //检测是否是管理员身份
    ServerResponse checkRoleAdmin(User user);

    //设置找回密码问题
    ServerResponse selectQuestion(String username);

    //设置找回密码答案
    ServerResponse<String> checkAnswer(String username,String question,String answer);

    //登陆状态下的重置密码
    ServerResponse<String> resetPassword(String passwordOld,String passwordNew,User user);

    //忘记密码的重设密码
    ServerResponse<String> forgetResetPassword(String username,String passwordNew,String forgetToken);

    //登录状态更新个人信息
    ServerResponse<User> updateInformation(User user);

    //获取用户详细信息
    ServerResponse<User> getInformation(Integer userId);

}
